package cn.exrick.xboot.modules.content.service;

import cn.exrick.xboot.base.XbootBaseService;
import cn.exrick.xboot.common.vo.SearchVo;
import cn.exrick.xboot.modules.base.entity.Department;
import cn.exrick.xboot.modules.content.entity.HontDepartment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 测试接口
 * @author Exrick
 */
public interface HontDepartmentService extends XbootBaseService<HontDepartment, String> {

    /**
     * 通过父id获取 升序
     * @param parentId
     * @param openDataFilter 是否开启数据权限
     * @return
     */
    List<HontDepartment> findByParentIdOrderBySortOrder(String parentId, Boolean openDataFilter);

    /**
     * 通过父id和状态获取
     * @param parentId
     * @param status
     * @return
     */
    List<HontDepartment> findByParentIdAndStatusOrderBySortOrder(String parentId, Integer status);

    /**
     * 部门名模糊搜索 升序
     * @param title
     * @param openDataFilter 是否开启数据权限
     * @return
     */
    List<HontDepartment> findByTitleLikeOrderBySortOrder(String title, Boolean openDataFilter);

    /**
     * 部门名模糊搜索 升序
     * @param title
     * @return
     */
    List<HontDepartment> findByTitleLikeOrder(String title);

    //部门tree
    List<HontDepartment> departmentTree();
    List<HontDepartment> findByParentIdOrderBySortOrder(String parentId);

    List<HontDepartment> getAllTeamList();
    HontDepartment findByTitle(String departmentTitles);
}